home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / s / ppagegenie.hlp < prev    next >
Text File  |  1993-01-28  |  1KB  |  56 lines

  1. /*
  2. @BPPGenieHelp.pprx@P
  3. Copyright Gold Disk Inc., February, 1992
  4. This genie reads the comment field in other genies and informs the user of the genies uses
  5. */
  6. parse arg genie
  7.  
  8. if ~show(l, "rexxsupport.library") then
  9.     if ~addlib("rexxsupport.library", 0, -30) then
  10.         exit_msg("Please install the rexxsupport.library in your libs: directory")
  11.  
  12. if ~open(file, genie, "r") then exit_msg("Unable to open Genie.")
  13.  
  14. string = ''
  15. do while ~eof(file)
  16.     line = readln(file)
  17.     if strip(line) = '' then iterate
  18.     if pos("/*", line) ~= 0 then
  19.        do
  20.        parse var line '/*' line
  21.        if strip(line) = '' then iterate
  22.        end
  23.     if pos("*/", line) ~= 0 then
  24.        do
  25.        parse var line line '*/'
  26.        if strip(line) ~= '' then
  27.      do
  28.      string = string||'0a'x||"@L"||line
  29.      end
  30.        leave
  31.        end
  32.     else
  33.        string = string||'0a'x||"@L"||line
  34. end
  35.  
  36. call close(file)
  37. if string = '' then exit_msg("No Help Available.")
  38.  
  39. fline = pos('@I', string) + 1
  40.  
  41. if fline > 1 then
  42. do
  43.    fstate = '['||word(statef(genie), 2)||']'
  44.    string = insert(fstate" ", string, fline)
  45. end
  46.  
  47. call ppm_Inform(1,substr(string,2),)
  48. exit
  49.  
  50. exit_msg: procedure
  51. do
  52.     arg message
  53.     if message ~= '' then call ppm_Inform(1,message,)
  54.     exit
  55. end
  56.